#! /bin/bash

_add_libs_to_minigui_pc () {
    minigui_pc=$PREFIX/lib/pkgconfig/minigui.pc
    tmp_file="tmp.file"
    echo > $tmp_file

    cat $minigui_pc | while read line; do
        echo $line | grep Libs: > /dev/null
        if [ $? -eq 0 ];then
            echo "$line -lts" >> $tmp_file
        else
            echo $line >> $tmp_file 
        fi
    done

    /bin/mv $tmp_file $minigui_pc
    return $?
}

do_postinstall () {
    if [ "x$_PKG" == "xminigui" ];then
        _add_libs_to_minigui_pc
    fi
    return $?
}



